package com.forum.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.forum.pojo.Tag;
import com.forum.service.TagService;
import com.forum.mapper.TagMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.management.Query;
import java.util.List;

/**
* @author 86152
* @description 针对表【tag】的数据库操作Service实现
* @createDate 2023-02-01 15:44:54
*/
@Service
public class TagServiceImpl extends ServiceImpl<TagMapper, Tag>
    implements TagService{
    @Autowired
    TagMapper tagMapper;
    @Override
    public List<Tag> findAll() {
        QueryWrapper<Tag> queryWrapper=new QueryWrapper<>();
        queryWrapper.orderByDesc("focus","counts");
        return tagMapper.selectList(queryWrapper);
    }
}




